<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="../AmazeUI-2.4.2/admin/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="../AmazeUI-2.4.2/admin/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <link rel="stylesheet" href="../AmazeUI-2.4.2/admin/css/amazeui.min.css"/>
    <link rel="stylesheet" href="../AmazeUI-2.4.2/admin/css/admin.css">
    <script src="../AmazeUI-2.4.2/admin/js/jquery.min.js"></script>
    <script src="../AmazeUI-2.4.2/admin/js/app.js"></script>



    <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>

</head>
<body>
<script type="text/javascript">
    function check(form) {
        if(form.question.value==""){
            alert('输入内容')
            form.question.onfocus;
            return false;
        }
        return true;
    }

</script>
<form action="addcomment" accept-charset="utf-8" method="post">

    <textarea placeholder="留言" id="question" name="question"  class="form-control" rows="3" cols="50"></textarea>
    <br/>
    <input type="submit" value="添加"  class="btn btn-default" onclick="return check(this.form)"/>
</form>

    <div class="listbiaoti am-cf">
      <ul class="am-icon-flag on">留言</ul>

      <!--这里打开的是新页面-->

    </div>

    <form class="am-form am-g">
          <table width="100%" class="am-table am-table-bordered am-table-radius am-table-striped am-table-hover">
            <thead>
              <tr class="am-success">
                <th class="table-id">id</th>
                <th class="table-title">留言</th>
                <th class="table-type">留言时间</th>
                <th class="table-author am-hide-sm-only">回复</th>

              </tr>
            </thead>
            <tbody>

            <c:forEach items="${commentsList}" var="comment">

              <tr>
                <td>${comment.questionUserId}</td>
                <td><a href="#">${comment.question}</a></td>
                <td>${comment.time}</td>
                <td class="am-hide-sm-only">${comment.answer}</td>

                <td>
                	<div class="am-btn-toolbar">
                    <div class="am-btn-group am-btn-group-xs">

                      <%--<button onclick="" class="am-btn am-btn-default am-btn-xs am-text-secondary am-round" data-am-modal="{target: '#my-popups'}" title="修改订单"><span class="am-icon-pencil-square-o"></span></button>--%>
                      <%--<button class="am-btn am-btn-default am-btn-xs am-text-danger am-round" title="删除订单"><span class="am-icon-trash-o" ></span></button>--%>
                    </div>
                  </div>
                </td>
              </tr>

            </c:forEach>

            </tbody>
          </table>
          <hr />
        </form>
</div>


</body>
</html>